Optimal. Leaf size=45 \[ \frac {3 a^2 x}{2}-\frac {2 a^2 \cos (c+d x)}{d}-\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2723}
\begin {gather*} -\frac {2 a^2 \cos (c+d x)}{d}-\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {3 a^2 x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2723
Rubi steps
\begin {align*} \int (a+a \sin (c+d x))^2 \, dx &=\frac {3 a^2 x}{2}-\frac {2 a^2 \cos (c+d x)}{d}-\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 34, normalized size = 0.76 \begin {gather*} -\frac {a^2 (-6 (c+d x)+8 \cos (c+d x)+\sin (2 (c+d x)))}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 52, normalized size = 1.16
method | result | size |
risch | \(\frac {3 a^{2} x}{2}-\frac {2 a^{2} \cos \left (d x +c \right )}{d}-\frac {a^{2} \sin \left (2 d x +2 c \right )}{4 d}\) | \(39\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-2 a^{2} \cos \left (d x +c \right )+a^{2} \left (d x +c \right )}{d}\) | \(52\) |
default | \(\frac {a^{2} \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-2 a^{2} \cos \left (d x +c \right )+a^{2} \left (d x +c \right )}{d}\) | \(52\) |
norman | \(\frac {\frac {a^{2} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 a^{2} x}{2}-\frac {a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+3 a^{2} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {3 a^{2} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {4 a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) | \(131\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 47, normalized size = 1.04 \begin {gather*} a^{2} x + \frac {{\left (2 \, d x + 2 \, c - \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2}}{4 \, d} - \frac {2 \, a^{2} \cos \left (d x + c\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 41, normalized size = 0.91 \begin {gather*} \frac {3 \, a^{2} d x - a^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 4 \, a^{2} \cos \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 78, normalized size = 1.73 \begin {gather*} \begin {cases} \frac {a^{2} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {a^{2} x \cos ^{2}{\left (c + d x \right )}}{2} + a^{2} x - \frac {a^{2} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} - \frac {2 a^{2} \cos {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \sin {\left (c \right )} + a\right )^{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.66, size = 38, normalized size = 0.84 \begin {gather*} \frac {3}{2} \, a^{2} x - \frac {2 \, a^{2} \cos \left (d x + c\right )}{d} - \frac {a^{2} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.58, size = 123, normalized size = 2.73 \begin {gather*} \frac {3\,a^2\,x}{2}-\frac {a^2\,\left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )-a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-a^2\,\left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}-4\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2\,\left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )-a^2\,\left (3\,c+3\,d\,x-4\right )\right )+a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________